package day12;

public class 视频二叉树测试 {
    public static void main(String[] args) {
        BinaryTree<Integer,String> tree = new BinaryTree<>();
        tree.put(1,"张三");
        tree.put(2,"李四");
        tree.put(3,"王五");
        System.out.println("插入完毕后的元素的个数是：" + tree.size());

        System.out.println("健2对应的元素是" + tree.get(2));
        System.out.println("---------先序遍历-----------");
        tree.postOerder();

        BinaryTree<Integer,String> tree2 = new BinaryTree<>();
        tree2.put(18,"张三");
        tree2.put(18,"张三");
        tree2.put(18,"张三");
        tree2.put(18,"张三");
        tree2.put(18,"张三");
        System.out.println("插入完毕后的元素的个数是：" + tree2.size());
        System.out.println("---------中序遍历-----------");
        tree2.inOerder();

    }
}
